package cn.harry.modular.sys.domain;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统配置信息表/枚举值表
 *
 * @author honghh Date 2019-11-25 16:36:48 Copyright (C) www.tech-harry.cn
 */
@Data
@TableName("sys_config")
public class SysConfig implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 *
	 */
	@Schema(description = "系统配置ID")
	@TableId
	private Long id;

	/**
	 * 系统内置: Y N
	 */
	@Schema(description = "系统内置: Y N ")
	private String paramType;

	/**
	 * key
	 */
	@Schema(description = "key")
	@TableField(condition = SqlCondition.LIKE)
	private String paramKey;

	/**
	 * value
	 */
	@Schema(description = "value")
	private String paramValue;

	/**
	 * name
	 */
	@Schema(description = "name")
	@TableField(condition = SqlCondition.LIKE)
	private String paramName;

	/**
	 * 状态 0：禁用 1：启用
	 */
	@Schema(description = "状态 0：禁用 1：启用")
	private String status;

	/**
	 * 备注
	 */
	@Schema(description = "备注")
	private String remark;

	/**
	 * 创建时间
	 */
	@Schema(description = "创建时间")
	@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
	private Date createTime;

	/**
	 * 修改时间
	 */
	@Schema(description = "修改时间")
	@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
	private Date modifyTime;

	/**
	 * 有效状态：0->无效；1->有效
	 */
	@Schema(description = "有效状态：0->无效；1->有效")
	@TableLogic
	private Integer valid;

	/** 开始时间 */
	@JsonIgnore
	@TableField(exist = false)
	private String beginTime;

	/** 结束时间 */
	@JsonIgnore
	@TableField(exist = false)
	private String endTime;

}
